﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ZXing;
using ZXing.QrCode;
using ZXing.Rendering;

namespace MyTest
{
    /// <summary>
    /// 教员:薛海
    /// 微信:xuehai03
    /// QQ:289477003
    /// 主窗体
    /// 2019-2-20
    /// </summary>
    public partial class FrmMain : Form
    {
        public FrmMain()
        {
            InitializeComponent();
        }

        //退出功能
        private void btnClose_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("确定要退出吗?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Information);
            if(result==DialogResult.Yes)
            {
                Application.Exit();
            }
           
        }
        //打开摄像头
        private void btnOpenCa_Click(object sender, EventArgs e)
        {
            FrmCamara fc = new FrmCamara();
            fc.Show();
        }

        //显示相片
        private void btnShowP_Click(object sender, EventArgs e)
        {
            FrmPhoto fp = new FrmPhoto();
            fp.Show();
        }
        //退出
        private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            Application.Exit();
        }

        //简单音乐播放器
        private void btnPlay_Click(object sender, EventArgs e)
        {
            FrmMusic fm = new FrmMusic();
            fm.Show();
        }

        //生成二维码
        private void btnZxing_Click(object sender, EventArgs e)
        {
            FrmZXing fz = new FrmZXing();
            fz.Show();
        }

        private void btnMove_Click(object sender, EventArgs e)
        {
            FrmMove fm = new FrmMove();
            fm.Show();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            FrmPingYin fpy = new FrmPingYin();
            fpy.Show();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            FrmList fl = new FrmList();
            fl.Show();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            FrmOwer fo = new FrmOwer();
            fo.Show();
        }

        //验证码
        private void btnNum_Click(object sender, EventArgs e)
        {
            frmNum fn = new frmNum();
            fn.Show();
        }

        //猜数小游戏
        private void button4_Click(object sender, EventArgs e)
        {
            frmCai fc = new frmCai();
            fc.Show();
        }


        //文本水印
        private void btnPic_Click(object sender, EventArgs e)
        {
            frmShui fs = new frmShui();
            fs.Show();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            frmSQLite fs = new frmSQLite();
            fs.Show();
        }

        private void btnSource_Click(object sender, EventArgs e)
        {
            frmSource fs = new frmSource();
            fs.Show();

        }

        private void button6_Click(object sender, EventArgs e)
        {
            frmAccess fa = new frmAccess();
            fa.Show();
        }

        private void btnSpeak_Click(object sender, EventArgs e)
        {

            frmSpeak fs = new frmSpeak();
            fs.Show();
        }

        private void button7_Click(object sender, EventArgs e)
        {
            frmMus fm = new frmMus();
            fm.Show();
        }

        private void button8_Click(object sender, EventArgs e)
        {
            frmSpk fs = new frmSpk();
            fs.Show();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            DateTime dt = DateTime.Now;

            this.label2.Text = dt.ToString();
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {
            this.label2.Text = DateTime.Now.ToString();
        }

        private void timer2_Tick(object sender, EventArgs e)
        {
            //跑马灯
            if (this.label1.Left < -label1.Width)
            {
                this.label1.Left = this.panel1.Width;
            }
            this.label1.Left -= 17;
        }

        private void button10_Click(object sender, EventArgs e)
        {
            frmShuZi fs = new frmShuZi();
            fs.Show();
        }

        private void button11_Click(object sender, EventArgs e)
        {
            frmImage fi = new frmImage();
            fi.Show();
        }

        private void button9_Click(object sender, EventArgs e)
        {
            frmWrite fw = new frmWrite();
            fw.Show();
        }

        private void btnFace_Click(object sender, EventArgs e)
        {
            frmFaces ff = new frmFaces();
            ff.Show();
        }

        
    }
}
